#include <cstdio>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

char getOneChar(const string& s)
{
    unordered_map<char, int> hash;
    for (auto c : s)
    {
        hash[c]++;
    }
    for (auto c : s)
    {
        if (hash[c] == 1)
            return c;
    }
    return '-';
}
int main()
{
    string s;
    while (cin >> s)
    {
        char ret = getOneChar(s);
        if (ret == '-')
            cout << "-1" << endl;
        else
            cout << ret << endl;
    }
    return 0;
}